from flask_restx import Resource

from app.common.libs import auth
from app.common.libs.permission import permission_control


class ParticipantBase(Resource):

    decorators = [permission_control, auth.login_required]

    def __init__(self, api=None, *args, **kwargs):
        super().__init__(api=api, *args, **kwargs)
        self.user = auth.current_user()
